import { get, post, put, del, del2 } from "@utils/http";

/**
 * @巡查项
 */

// 新增巡查项
export const reqPatrolItemAdd = (data) => post(`/patrolItem/add`, data);

// 更新巡查项
export const reqPatrolItemUpdate = (patrolItemId, data) =>
  put(`/patrolItem/${patrolItemId}`, data);

// 巡查项分页
export const reqPatrolItemPage = (page, limit, params) =>
  post(`/patrolItem/page/${page}/${limit}`, params);

// 删除巡查项内容
export const reqPatrolCategoryDel = (data) =>
  del2(`/patrolItem/category`, data);

// 删除巡查项
export const reqPatrolItemDel = (patrolItemId) =>
  del(`/patrolItem/${patrolItemId}`);

/**
 * @巡查点
 */

// 新增巡查点
export const reqPatrolPointAdd = (data) => post(`/patrolPoint/add`, data);

// 更新巡查点
export const reqPatrolPointUpdate = (patrolItemId, data) =>
  put(`/patrolPoint/${patrolItemId}`, data);

// 巡查点分页
export const reqPatrolPointPage = (page, limit, params) =>
  post(`/patrolPoint/page/${page}/${limit}`, params);

// 删除巡查点
export const reqPatrolPointDel = (patrolPointId) =>
  del(`/patrolPoint/${patrolPointId}`);
